package day02;

import java.util.Random;

public class homeworkarr01 {
    public static void main(String[] args) {
        int[][] arr = {{1, 2}, {3, 4, 5, 6, 7}, {8, 9, 10}};
        Random sc = new Random();
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                int tmp;
                int c = sc.nextInt(arr[i].length);
                tmp=arr[i][j];
                arr[i][j]= arr[i][c];
                arr[i][c]=tmp;
            }
            int r =sc.nextInt(arr.length);
            int[] rc= new int[arr[i].length];
            rc=arr[i];
            arr[i]=arr[r];
            arr[r]=rc;
        }
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                System.out.print(arr[i][j]+" ");
            }
            System.out.println();
        }
    }
}